<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="http://localhost/shopex/" />
<link rel="stylesheet" type="text/css" href="App/Admin/Common/images/metinfo.css" />
<script type="text/javascript" src="App/Admin/Common/ckeditor/ckeditor.js"></script>
<link rel="stylesheet" href="App/Admin/Common/kindeditor/themes/default/default.css" />
<script charset="utf-8" src="App/Admin/Common/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="App/Admin/Common/kindeditor/lang/zh_CN.js"></script>
<script language="javascript" type="text/javascript" src="App/Admin/Common/DatePicker/WdatePicker.js"></script>
<script>
			var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[name="content"]', {
					allowFileManager : true
				});
				
			});
</script>
<script charset="utf-8" src="App/Admin/Common/js/jQuery1.7.2.js"></script>


<link rel="stylesheet" type="text/css" href="App/Admin/Common/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="App/Admin/Common/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="App/Admin/Common/css/style.css" />
<style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


</style>
</head>

<body>

	<div class="metinfotop">
	<div class="position">简体中文：活动管理 > <a href="javascript:void(0)"><?php echo ($lang); ?>活动</a></div>

	</div>
	<div class="clear"></div>


<div class="stat_list">
	<ul>
		<li class="now"><a href="index.php/admin/activity/save" title="<?php echo ($lang); ?>活动"><?php echo ($lang); ?>活动</a></li>
		<li><a href="index.php/admin/activity/list" title="活动列表">活动列表</a></li>
	</ul>
</div>
<form method="post" name="myform" action="index.php/admin/activity/save/id/<?php echo ($one["aid"]); ?>" target="_self" enctype="multipart/form-data">
<table class="table table-bordered table-hover definewidth m10">
    <tr>
        <td width="10%" class="tableleft">活动名称</td>
        <td><input type="text" id="title" name="title" value="<?php echo ($one["title"]); ?>"/><span></span></td>
    </tr>
    
    <?php if($one["thumb"] != ''): ?><tr>
        <td width="10%" class="tableleft" style="line-height:100px;">LOGO图片</td>
        <td><img src="<?php echo ($one["thumb"]); ?>" height="200" width="200" /></td>
    </tr><?php endif; ?>
    
    <tr>
        <td width="10%" class="tableleft">上传LOGO图片</td>
        <td><input type="file" id="thumb" name="thumb"/><span></span></td>
    </tr>
    
    
   <tr>
        <td class="tableleft">活动类型</td>
        <td>
            <input type="radio" id="type" name="type" value="降价" <?php if($one['type'] == '降价'): ?>checked="checked"<?php endif; ?> />降价
           
           <input type="radio" id="type" name="type" value="打折" <?php if($one['type'] == '打折'): ?>checked="checked"<?php endif; ?> />打折
        </td>
    </tr>
    
    <tr>
        <td class="tableleft">优惠值</td>
        <td>
           <input type="text" id="value" name="value" value="<?php echo ($one["value"]); ?>" />
        </td>
    </tr>
     
   <tr>
        <td class="tableleft">活动时间</td>
        <td>
            开始时间<input name="formtiem" class="Wdate" type="text" value="<?php echo ($one["formtiem"]); ?>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"> 
            结束时间<input name="endtiem" class="Wdate" type="text" value="<?php echo ($one["endtiem"]); ?>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"> 
        </td>
    </tr>
    
     
     
    <tr>
        <td class="tableleft">状态</td>
        <td>
            <input type="radio" id="checkyn" name="status" value="1" <?php if($one['status'] == 1): ?>checked="checked"<?php endif; ?> /> 有效
            <input type="radio" id="checkyn" name="status" value="0" <?php if($one['status'] == 0): ?>checked="checked"<?php endif; ?> /> 无效
        </td>
    </tr>

    <tr>
        <td class="tableleft"></td>
        <td>
            <button type="submit" class="btn btn-primary" >保存</button> &nbsp;&nbsp;<button type="submit" class="btn btn-success" name="backid" id="backid">返回列表</button>
        </td>
    </tr>
</table>
</form>

</body>
</html>
<script>
    $(function () {       
		$('#backid').click(function(){
				window.location.href="index.php/admin/activity/list";
		 });

    });
</script>